#ifndef __SERVER_SESSION_FACTORY_H__
#define __SERVER_SESSION_FACTORY_H__

#pragma once



#include <MemoryPoolFactory.h>
#include <Singleton.h>
using namespace util;

class FieldServerSession;
class BattleServerSession;
class TempServerSession;
class MasterServerSession;
class DBProxyServerSession;
class AuthAgentServerSession;
class WorldServerSession;
class GuildServerSession;
class ServerSession;

class ServerSessionFactory : public Singleton<ServerSessionFactory>
{
public:
	ServerSessionFactory();
	~ServerSessionFactory();

	ServerSession *									AllocServerSession( eSERVER_TYPE eServerType );
	VOID											FreeServerSession( ServerSession * pServerSession );


private:

	CMemoryPoolFactory<FieldServerSession> *		m_pFieldServerPool;
	CMemoryPoolFactory<BattleServerSession> *		m_pBattleServerPool;
	CMemoryPoolFactory<TempServerSession> *			m_pTempServerPool;
	CMemoryPoolFactory<MasterServerSession> *		m_pMasterServerPool;
	CMemoryPoolFactory<DBProxyServerSession> *		m_pDBProxyServerPool;
	CMemoryPoolFactory<AuthAgentServerSession> *	m_pAuthAgentServerPool;
	CMemoryPoolFactory<WorldServerSession> *		m_pWorldServerPool;
	CMemoryPoolFactory<GuildServerSession> *		m_pGuildServerPool;
};


#endif // __SERVER_SESSION_FACTORY_H__